A door frame is a structural element that forms the opening in a wall for a door to fit into. It consists of two vertical side pieces, called jambs or stiles, and a horizontal header piece. The purpose of a door frame is to provide support and stability for the door, as well as to prevent it from warping or sagging over time due to weather conditions or other environmental factors. Door frames are typically made out of wood, metal, or composite materials, depending on the style and design of the building in which they are installed.